package com.ljcalc.business.components;

public class NumberPercentage {

	private long num = 0;
	private long percentage = 0;
	
	private boolean numModified = false;
	private boolean perModified = false;
	
	public NumberPercentage(long num, long percentage){
		this.num = num;
		this.percentage = percentage;
	}
	
	public NumberPercentage(){
		this.num = 0;
		this.percentage = 0;
	}
	
	
	public long getNum(){
		return this.num;
	}
	
	public long getPercentage(){
		return this.percentage;
	}
	
	public boolean hasValues(){
		return numModified&&perModified;
	}
	
	public boolean isNumModified(){
		return numModified;
	}
	
	public boolean isPerModified(){
		return perModified;
	}

	public void setNum(long l) {
		this.num = l;
		this.numModified = true;
	}
	
	public void setPer(long l){
		this.percentage = l;
		this.perModified = true;
	}
	
	public void clearFlags(){
		this.perModified = false;
		this.numModified = false;
	}
	
	public String toString(){
		return num + ":" + percentage;
	}
}
